package com.itheima.AOP;

import jdk.nashorn.internal.objects.annotations.Property;
import org.aspectj.lang.annotation.*;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class Teacher {
    @Pointcut("execution(* *..*(..))")
    public void pt(){}

    @Before("pt()")
    public void Before(){
        System.out.println("Before run....");
    }
    @After("pt()")
    public void After(){
        System.out.println("After run....");
    }

    @AfterThrowing("pt()")
    public void AfterThrowing(){
        System.out.println("AfterThrowing run....");
    }

    @AfterReturning("pt()")
    public void AfterReturning(){
        System.out.println("AfterReturning run....");
    }

}
